/*
 * @Author: weiwang
 * @Date:   2018-12-02 13:14:18
 * @Last Modified by:   weiwang
 * @Last Modified time: 2018-12-10 23:17:41
 */
'use strict';

const Service = require('../core/common');

class IntegralsService extends Service {
  findAll(params = {}) {
    const { ctx } = this;

    const about = {
      ...params,
      ...this.paging(params),
    }

    return ctx.model.Integrals.findAndCountAll(about);
  }

  findById(id) {
    const ctx = this.ctx;

    return ctx.model.Integrals.findById(id);
  }

  create() {
    const ctx = this.ctx;

    return ctx.model.Integrals.create();
  }

}

module.exports = IntegralsService;